package com.dearcocoa.controller;


import com.dearcocoa.common.BaseResult;
import com.dearcocoa.service.IBlogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dearcocoa
 * @since 2020-07-25
 */
@RestController
@RequestMapping("/blog")
public class BlogController {

    @Autowired
    private IBlogService iBlogService;

    @RequestMapping(path = "all",method= RequestMethod.GET)
    public BaseResult all() {
        return BaseResult.ofSuccess(iBlogService.list());
    }
}
